<!DOCTYPE html>
<html>
<head>
  <title>生命周期</title>
  <script type="text/javascript" src="./vue.js"></script>
</head>
<body>  
  <div id="app">
      <div @click="handlerClick" v-once>{{message}}</div>
      <div v-html="html"></div>
  </div>
  <script>
    var app = new Vue({
      el : '#app' ,
      data : {
        message : "hello world",
        html : "<div>{{message}}</div>"
      },
      methods : {
        handlerClick : function() {
          alert('handlerClick');
        }
      },
      beforeCreate : function() {
        alert('beforeCreate');
       },
       created : function() {
        alert('created');
       },
       beforeMount : function() {
        alert('beforeMount');
       },
       mounted: function() {
        alert('mounted');
       },
       beforeUpdate: function() {
        alert('beforeUpdate');
       },
       updated: function() {
        alert('updated');
       },
       beforeDestory: function() {
        alert('beforeDestory');
       },
       destory: function() {
        alert('destory');
       }
    });
  </script>
</body>
</html>